package com.fount4j.generator;

import com.fount4j.generator.context.GeneratorContext;
import com.fount4j.generator.context.YmlGeneratorContext;
import com.fount4j.generator.introspect.Generator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * 生成文件
 *
 * @author Morven 2016/12/21
 */
public class GenerateFiles {
    private static final Logger LOGGER = LoggerFactory.getLogger(GenerateFiles.class);

    public static void main(String[] args) {
        LOGGER.info("开始解析生成器配置");
        GeneratorContext context = new YmlGeneratorContext("/generate.yml");
        Generator generator = new Generator(context);
        LOGGER.info("开始生成文件");
        generator.generate();
        LOGGER.info("生成文件结束");
    }
}
